package com.tanjie.blackbean.system.admin.model.menu;

import com.baomidou.mybatisplus.annotation.*;
import com.tanjie.blackbean.pojo.system.ClientType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * 菜单管理
 *
 * @author tanjie
 * @since 2022-04-20
 */
@Getter
@Setter
@ToString
@TableName("sys_menu")
@Schema(name = "MenuPO", description = "菜单管理")
public class MenuPO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @Schema(description = "菜单路由名称")
    @TableField("`name`")
    private String name;

    @Schema(description = "菜单显示名称")
    @TableField("title")
    private String title;

    @Schema(description = "客户端类型：1：SYS系统后台 2：OPT-PC运营商PC端 3：OPT-H5运营商H5端")
    @TableField("client_type")
    private ClientType clientType;

    @Schema(description = "父菜单ID")
    @TableField("parent_id")
    private String parentId;

    @Schema(description = "路由路径")
    @TableField("`path`")
    private String path;

    @Schema(description = "菜单树的深度")
    @TableField("layer")
    private Integer layer;

    @Schema(description = "菜单图标")
    @TableField("icon")
    private String icon;

    @Schema(description = "排序")
    @TableField("sort")
    private Integer sort;

    @Schema(description = "状态：0-禁用 1-开启")
    @TableField("`visible`")
    private Boolean visible;

    @Schema(description = "跳转路径")
    @TableField("redirect")
    private String redirect;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Schema(description = "创建人")
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private String createBy;

    @Schema(description = "修改人")
    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

}
